Question 1

Manipulating and Joining Data

I combined German designations under German and Russian designations under Russia. All other countries which have changed names over time, were left as is.

Calculate the number of Olympics each country participated in.

## # A tibble: 20 × 2
##    region         Year_Count
##    <chr>               <int>
##  1 Austria                22
##  2 Canada                 22
##  3 Czech Republic         22
##  4 Finland                22
##  5 France                 22
##  6 Hungary                22
##  7 Italy                  22
##  8 Norway                 22
##  9 Poland                 22
## 10 Sweden                 22
## 11 Switzerland            22
## 12 UK                     22
## 13 USA                    22
## 14 Belgium                20
## 15 Germany                20
## 16 Japan                  20
## 17 Netherlands            20
## 18 Romania                20
## 19 Australia              19
## 20 Bulgaria               19

Calculate how many medals each country won over time

## # A tibble: 206 × 3
## # Groups:   Country [10]
##    Country        Year Medal_Count
##    <chr>         <int>       <int>
##  1 United States  2010          37
##  2 Germany        2002          36
##  3 United States  2002          34
##  4 Germany        1988          33
##  5 Russia         2014          33
##  6 Germany        2010          30
##  7 Germany        1976          29
##  8 Germany        1998          29
##  9 Germany        2006          29
## 10 Russia         1988          29
## # ℹ 196 more rows

Graph medals overtime by Country - Top 10 Countries

Initially I made a line graph with the top 10 countries and a second where they are separated in facets. I prefer the faceted version because the initial line graph could be much clearer, and the facets make interpretation a little easier.

Calculating the All-time medal totals by Country

Graph the all-time medal counts by Country

Question 2

Looking only at the Gold medals.

The graph shows the top 10 countries with the largest difference between any ranks. Some of the big winners (US, Russia, and China) all fall in the rankings when they are adjusted for population. This visualization is a little convoluted.

The graph shows that Russia, United States, China, Italy, etc (the Countries in Blue) ranked better after adjusting for GDP. The countries in purple ranked worse after adjusting for GDP.

The graph shows that Olympic winners like Russia, United States, Germany, China, Canada, etc (all Countries in purple) performed much worse after adjusting for population. The countries in blue performed better after adjusting for Population.

Question 3: Host Country Advantage

Setting up data set

Visualizing the Advantage/Disadvantage

Of the hosting countries, 6 have a higher average medals per Olympics hosted, than not hosted. Some countries appear to have more of an advantage when hosting. Conversely, only 3 seem to have a hosting disadvantage: Austria, Switzerland, and Germany.

Question 4: Most Successful Athletes

The graph shows the total medals earned by the 20 most successful winter athletes by the total numbers of medals won.

## # A tibble: 20 × 4
## # Groups:   ID, Name [20]
##        ID Name                                   Sex   Medal_Count
##     <int> <chr>                                  <chr>       <int>
##  1  11951 "Ole Einar Bjrndalen"                  M              13
##  2   9747 "Stefania Belmondo"                    F              10
##  3  11943 "Marit Bjrgen"                         F              10
##  4 112111 "Raisa Petrovna Smetanina"             F              10
##  5  28751 "Ursula \"Uschi\" Disl"                F               9
##  6  54647 "Edy Sixten Jernberg"                  M               9
##  7  92566 "Claudia Pechstein"                    F               9
##  8 132791 "Lyubov Ivanovna Yegorova"             F               9
##  9     20 "Kjetil Andr Aamodt"                   M               8
## 10   3604 "Viktor An"                            M               8
## 11  32700 "Karin Enke-Kania (-Busch-, -Richter)" F               8
## 12  35539 "Sven Fischer"                         M               8
## 13  43154 "Ricco Gro"                            M               8
## 14  64799 "Galina Alekseyevna Kulakova"          F               8
## 15  86067 "Gunda Niemann-Stirnemann-Kleemann"    F               8
## 16  88298 "Apolo Anton Ohno"                     M               8
## 17 131897 "Irene Karlijn \"Ireen\" Wst"          F               8
## 18   7304 "Ivar Eugen Ballangrud (Eriksen-)"     M               7
## 19  28063 "Manuela Di Centa"                     F               7
## 20  31659 "Andrea Ehrig-Schne-Mitscherlich"      F               7

The graph shows the average height and weight of Olympic athletes who won medals, grouped by Sex.

Question 5: Interactive Graphs

Use ggplotly to make the Number of Medals per Year graph interactive

This initial graph is much improved upon when made interactive. A user can now more interpret the informatiopn by hovering over data points and clicking on the countries to tell which is which.

Use plot_ly to make the Average Height and Weight graph interactive

This interactive version allows the user to hover on the point and see the exact statistics as well as the exact sport the point belongs to without overcrowding the plot with labels.

Question 6: add data table